<?php
/*
 * @Author: zeyudada
 * @Date: 2022-01-09 17:22:50
 * @LastEditTime: 2022-04-08 11:08:09
 * @Description: 程序加载入口
 * @Q Q: zeyunb@vip.qq.com(1776299529)
 * @E-mail: admin@zeyudada.cn
 * 
 * Copyright (c) 2022 by zeyudada, All Rights Reserved. 
 */

//安全检测
date_default_timezone_set("PRC");
require_once('safe.php');

session_start();
define('SYSTEM_ROOT', dirname(__FILE__) . '/');
define('ROOT', dirname(SYSTEM_ROOT) . '/');

include_once(SYSTEM_ROOT . 'config.php');
require_once(SYSTEM_ROOT . 'db.class.php');

if(!DEBUG) error_reporting(0);
else error_reporting(E_ALL & ~E_NOTICE);
//不显示错误信息

//连接数据库
$DB = new DB($host, $user, $pwd, $dbname, $port);
if (!$DB) exit(mysqli_connect_error());

require_once(SYSTEM_ROOT . 'function.php');

require_once(ROOT . 'vendor/autoload.php');


$config = $DB->get_row("SELECT * FROM `config` WHERE id = 1");
